<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
    <meta name=“viewport” content=“width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no”>
    <title>{$theme['title']}</title>
    <script src="https://css2020.yixuan.net/2020css/yx2020/js/jquery.js?v=2"></script>
    <link rel="stylesheet" type="text/css" href="{$_G['URL']['EDUCATION_STATIC_PATH']}/css/reset.css?v=3">
    <link rel="stylesheet" type="text/css" href="https://css2020.yixuan.net/2020css/yx2020/css/swiper.min.css">
    <script src="{$_G['URL']['LOTTERY_CSS']}lottery/js/layer/layer.js"></script>
    <script src="{$_G['URL']['YX2020_CSS']}js/md5.js?v=2"></script>
    <script src="{$_G['URL']['YX2020_CSS']}js/swiper-3.4.2.min.js"></script>
    <link rel="stylesheet" type="text/css" href="{$_G['URL']['EDUCATION_STATIC_PATH']}/css/style.css?v=10">
    {if $config['weixinh5']==2}
    <script src="{$_G['URL']['YX2020_CSS']}js/vconsole.min.js"></script>
    <script> var vConsole = new VConsole(); </script>
    {/if}
  <script type="text/javascript" src="{$_G['URL']['PUBLIC_JS']}yx2020/ping.js?v=15"></script>
  <script type="text/javascript" src="{$_G['URL']['PUBLIC_JS']}yx2020/duihua.js?v=18"></script>
  <script type="text/javascript" src="{$_G['URL']['PUBLIC_JS']}yx2020/swiper_2022.js?v=2"></script>

  <script>
    init();
    window.onresize = init;
    function init(){
      document.documentElement.style.fontSize =
              document.documentElement.clientWidth / 7.5 + 'px';
    }
  </script>
</head>
<body>
  <div style="width: 100%;height: 100vh">
      <iframe id="mapPage" width="100%" height="100%" frameborder=0
              src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key={$map_key}&referer=myapp">
      </iframe>
  </div>
</body>
<script>
  window.addEventListener('message', function(event) {
    // 接收位置信息，用户选择确认位置点后选点组件会触发该事件，回传用户的位置信息
    var loc = event.data;
    if (loc && loc.module == 'locationPicker') {
            //防止其他应用也会向该页面post信息，需判断module是否为'locationPicker'
      console.log('location', loc);
        var cachePostUrl = '/{php echo createMobileUrl("wx",array("themeid"=>$themeid,"from"=>"mobile","r"=>"education.index.setUserLocationCache"));}';
        $.ajax({
            type:'POST',
            dataType:'json',
            data: loc,
            url:cachePostUrl,
            success:function (res){

            },
            complete:function (res) {
                layer.msg('正在返回活动...');
                history.go(-1)
            }
        });
    }
  }, false);
</script>
{include file='base/addlog'}
</html>